﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace Tanks
{
    public class TankManager
    {
        public List<Tanks> tanks = new List<Tanks>();
        public TankManager()
        {
            tanks.Add(new PlayerTank());
        }
        public void Load(ContentManager Content)
        {
            //load the tanks into the game
            for (int index = 0; index < tanks.Count ; index++)
            {
                tanks[index].Load(Content);
            }
        }

        public void Update(GameTime GameTime)
        {
            //update all the tanks on the field
            for (int index = 0; index < tanks.Count ; index++)
            {
                tanks[index].Update(GameTime);
            }
        }
        public void Draw(SpriteBatch Batch)
        {
            for (int index = 0; index < tanks.Count ; index++)
            {
                tanks[index].Draw(Batch);
            }
        }

        

    }
}
